import http from './http';
export default {
   
    //通过id查询文章
    __api_list_artical(params,id) {
        return http.request({
            url: '/articalDetail/'+id,
            method: 'GET',
            params: params
        });
    },
     //通过id修改文章
     __api_update_artical(params,id) {
        return http.request({
            url: '/articalDetail/'+id,
            method: 'PUT',
            params: params
        });
    },
   
    //增加详细文章信息
    __api_add_articalDetail(params) {
        return http.request({
            url: '/articalDetail',
            method: 'POST',
            params: params
        });
    },

    //查询重要文章表
    __api_list_importArtical(params) {
        return http.request({
            url: '/importArtical',
            method: 'GET',
            params: params
        });
    },
    __api_importArtical_delete(params) {
        return http.request({
            url: '/importArtical/' + params.id,
            method: 'DELETE',
            params: params
        })
    },


    __api_login(params) {
        return http.request({
            url: '/publishers',
            method: 'GET',
            params: params
        });
    },
    __api_list_delete(params) {
        return http.request({
            url: '/users/' + params.id,
            method: 'DELETE',
        });
    },

    //草稿箱
    __api_list_drafts(params) {
        return http.request({
            url: '/articalDetail?isDraft=true',
            method: 'GET',
            params: params
        });
    },
    // 个人文章
    __api_list_essays(params) {
        return http.request({
            url: '/articalDetail',
            method: 'GET',
            params: params
        });
    },

    // 删除文章或者草稿
    __api_delete_article_id(params,id) {
        return http.request({
            url: '/articalDetail/'+id,
            method: 'DELETE',
            params: params
        });
    },

    // 最近十条文章
    __api_recent_article(params) {
        return http.request({
            url: '/articalDetail?_limit=10&_sort=likeNum&_order=desc',
            method: 'GET',
            params: params
        });
    },




}